package principles.lsp;

public class Sup {
    public void create(Father father){
        System.out.println("Sup...Father");
    }

    public void create2(FatherSub fatherSub){
        System.out.println("Sup...FatherSub");
    }
}
class Sub extends Sup{
    public void create(Father father){
        System.out.println(("Sup...Father"));
    }

    public void create2(FatherSub fatherSub){
        System.out.println("sub...Father...");
    }
}
class Father{

}
class FatherSub extends Father{

}
class TestSup{
    public static void main(String[] args) {
        FatherSub fatherSub = new FatherSub();

        Sup sup = new Sup();

        sup.create(fatherSub);

        Sub sub = new Sub();

        sub.create(fatherSub);

        System.out.println("====");

        Sup sup2 = new Sup();

        sup2.create2(fatherSub);

        Sub sub2 = new Sub();

        sub2.create2(fatherSub);
    }
}
